export const home = {
    state: {
        banner: [],
        list: []
    },
    mutations: {
        banners(state, data) {
            state.banner = data;
        },
        getList(state, data) {
            state.list = data
        }
    },
    actions: {
        banners(context) {
            console.log(context)
            this.$http.banner().then(res => {
                context.commit('banners', res.data.data)
            })
        },
        getList(context) {
            this.$http.getList().then(res => {
                context.commit('getList', res.data.data)
            })
        }
    },
    modules: {}
}